home *** CD-ROM | disk | FTP | other *** search
/ MacHome 2001 January / MacHome Magazine Demo Disc January 2001.iso / mac / Software / Networking / InterMapper 3.0 - PPC.sea / InterMapper 3.0 - PPC / InterMapper™ 3.0-PPC / InterMapper™ 3.0-PPC.rsrc / PrTy_150_com.dartware.tcp.ftp.login < prev    next >
Encoding:
Text File  |  2000-07-24  |  2.9 KB  |  114 lines

  1. <!-- 
  2.     FTP (Login) (com.dartware.tcp.ftp.login)
  3.     Copyright © 2000 Dartware, LLC. All rights reserved.
  4. -->
  5.  
  6. <header>
  7.     type            =     "tcp-script"
  8.     package            =     "com.dartware"
  9.     probe_name        =    "tcp.ftp.login"
  10.     human_name        =    "FTP (Login)"
  11.     version            =     "1.1"
  12.     address_type    =     "IP"
  13.     port_number        =    "21"
  14.     
  15.     old_protocol    =     "8"            # Backward compat. with old numbering scheme.
  16.     old_script        =     "8002"
  17.  
  18. </header>
  19.  
  20. <description>
  21.  
  22. ≤GB≥File Transfer Protocol (Login)≤P≥
  23.  
  24. The standard protocol for transferring files on TCP/IP internets, as defined in ≤U2≥RFC 959≤P0≥.  The default TCP port number for FTP control connections is port 21.
  25.  
  26. This TCP probe connects to the FTP server's control port (21), logs in using the specified UserID and Password, and then issues a NOOP command.  The probe concludes by issuing the QUIT command.
  27.  
  28. ≤i≥User ID≤p≥ is the account name used to login to the FTP server.
  29.  
  30. ≤i≥Password≤p≥ is the account password used to verify the User ID's identity.
  31.  
  32. Note:  If this probe queries the FTP server often at regular intervals, it will appear in your FTP server's log files as a succession of "Login"  and "Logout" log lines.
  33.  
  34. </description>
  35.  
  36. <parameters>
  37.  
  38. "User ID"        =    "anonymous"
  39. "Password"        =    ""
  40.  
  41. </parameters>
  42.  
  43. <script>
  44.  
  45. CONN #60 (connect timeout in secs)
  46. WAIT #30 @IDLE (idle timeout in secs)
  47. MTCH "220" else goto @UNEXPECTED_GREETING
  48. EXPT "220 " else goto @DISCONNECT
  49. SEND "USER ${User ID}\r\n"
  50. MTCH "331" else goto @BAD_USER_RESPONSE
  51. EXPT "331 " else goto @DISCONNECT
  52. SEND "PASS ${Password}\r\n"
  53. MTCH "230" else goto @BAD_PASS_RESPONSE
  54. EXPT "230 " else goto @DISCONNECT
  55. SEND "NOOP\r\n"
  56. MTCH "200" else goto @BAD_NOOP_RESPONSE
  57. EXPT "200 " else goto @DISCONNECT
  58. SEND "QUIT\r\n"
  59. MTCH "221" #+2
  60. EXPT "221 " #+1
  61. DONE OKAY
  62.  
  63. @UNEXPECTED_GREETING:
  64. STAT DOWN "[FTP] Unexpected greeting from port ${_REMOTEPORT}. (${_LINE:50})"
  65. SEND "QUIT\r\n"
  66. MTCH "221" #+2
  67. EXPT "221 " #+1
  68. EXIT
  69.  
  70. @BAD_USER_RESPONSE:
  71. MTCH "500" else goto @UNEXP_USER_RESPONSE
  72. STAT ALRM "[FTP] Port ${_REMOTEPORT} did not recognize the \"USER\" command. (${_LINE:50})"
  73. SEND "QUIT\r\n"
  74. MTCH "221" #+2
  75. EXPT "221 " #+1
  76. EXIT
  77.  
  78. @UNEXP_USER_RESPONSE:
  79. STAT ALRM "[FTP] Unexpected response to USER command. (${_LINE:50})"
  80. SEND "QUIT\r\n"
  81. MTCH "221" #+2
  82. EXPT "221 " #+1
  83. EXIT
  84.  
  85. @BAD_PASS_RESPONSE:
  86. MTCH "530" else goto @UNEXP_PASS_RESPONSE
  87. STAT WARN "[FTP] Incorrect login for \"${User ID}\". (${_LINE:50})"
  88. SEND "QUIT\r\n"
  89. MTCH "221" #+2
  90. EXPT "221 " #+1
  91. EXIT
  92.  
  93. @UNEXP_PASS_RESPONSE:
  94. STAT ALRM "[FTP] Unexpected response to PASS command. (${_LINE:50})"
  95. SEND "QUIT\r\n"
  96. MTCH "221" #+2
  97. EXPT "221 " #+1
  98. EXIT
  99.  
  100. @BAD_NOOP_RESPONSE:
  101. STAT ALRM "[FTP] Unexpected response to NOOP command. (${_LINE:50})"
  102. SEND "QUIT\r\n"
  103. MTCH "221" #+2
  104. EXPT "221 " #+1
  105. EXIT
  106.  
  107. @IDLE:
  108. DONE DOWN "[FTP] No data for ${_IDLETIMEOUT} seconds.  Was expecting \"${_STRINGTOMATCH}\". [Line ${_IDLELINE}]"
  109.  
  110. @DISCONNECT:
  111. DONE DOWN "[FTP] Connection disconnected while expecting \"${_STRINGTOMATCH}\"."
  112.  
  113. </script>
  114.